import {
  Button,
  Input,
  Form,
  FormItem,
  Radio,
  RadioGroup,
  Checkbox,
  CheckboxGroup,
  Select,
  Option,
  Table,
  TableColumn,
  Row,
  Col,
  Dialog,
  DatePicker,
  Message,
  MessageBox,
  Tabs,
  TabPane,
  Loading,
  Tooltip,
  TimeSelect,
  TimePicker,
  Tag,
  Dropdown,
  DropdownMenu,
  DropdownItem,
  Tree,
  Container,
  Header,
  Aside,
  Main,
  CollapseTransition,
  Progress
} from 'element-ui'
import NbPopover from '@/components/nb-popover'
import NbButton from '@/components/nb-button'
import NbImg from '@/components/nb-img'

export default (Vue) => {
  Vue.component(Dropdown.name, Dropdown)
  Vue.component(DropdownMenu.name, DropdownMenu)
  Vue.component(DropdownItem.name, DropdownItem)
  Vue.component(Button.name, Button)
  Vue.component(Input.name, Input)
  Vue.component(Form.name, Form)
  Vue.component(FormItem.name, FormItem)
  Vue.component(Radio.name, Radio)
  Vue.component(RadioGroup.name, RadioGroup)
  Vue.component(Checkbox.name, Checkbox)
  Vue.component(CheckboxGroup.name, CheckboxGroup)
  Vue.component(Select.name, Select)
  Vue.component(Option.name, Option)
  Vue.component(Table.name, Table)
  Vue.component(TableColumn.name, TableColumn)
  Vue.component(Row.name, Row)
  Vue.component(Col.name, Col)
  Vue.component(Dialog.name, Dialog)
  Vue.component(DatePicker.name, DatePicker)
  Vue.component(Message.name, Message)
  Vue.component(MessageBox.name, MessageBox)
  Vue.component(Tabs.name, Tabs)
  Vue.component(TabPane.name, TabPane)
  Vue.component(Tooltip.name, Tooltip)
  Vue.component(TimeSelect.name, TimeSelect)
  Vue.component(TimePicker.name, TimePicker)
  Vue.component(Tag.name, Tag)
  Vue.component(Tree.name, Tree)
  Vue.component(NbPopover.name, NbPopover)
  Vue.component(NbButton.name, NbButton)
  Vue.component(Container.name, Container)
  Vue.component(Header.name, Header)
  Vue.component(Aside.name, Aside)
  Vue.component(Main.name, Main)
  Vue.component(CollapseTransition.name, CollapseTransition)
  Vue.component(NbImg.name, NbImg)
  Vue.component(Progress.name, Progress)
  Vue.use(Loading)

  Vue.prototype.$loading = Loading.service
  Vue.prototype.$message = Message
  Vue.prototype.$msgbox = MessageBox
  Vue.prototype.$confirm = MessageBox.confirm
  Vue.prototype.$alert = MessageBox.alert
}
